home *** CD-ROM | disk | FTP | other *** search
/ PC Home 48 / Fun Clicp Art 5000.iso / r / mbm / 00761_SU-bt etudes.ls < prev    next >
Encoding:
Text File  |  1996-05-11  |  1.2 KB  |  53 lines

  1. on MouseClick
  2.   global gLabel, gLocLabel, gEtudAct, gNumSpr, gBoutons, gSurvolPrec
  3.   set choix to chars(word 1 of the name of cast the castNum of sprite gNumSpr, 3, 4)
  4.   if choix <> "HI" then
  5.     if the optionDown and (choix = "SU") then
  6.       set choix to "ST"
  7.     end if
  8.     if (choix = "HI") or (choix = "EN") then
  9.       sound fadeOut 1, 30
  10.     end if
  11.     set gLocLabel to "SU:OU" && gEtudAct
  12.     set gLabel to "SU:IN" && choix
  13.     if the optionDown and (choix = "SU") then
  14.       set choix to "ST"
  15.     end if
  16.   else
  17.     gBoutons(relache, gNumSpr)
  18.     set gSurvolPrec to -1
  19.     beep()
  20.   end if
  21. end
  22.  
  23. on mouseDown
  24.   global gNumSpr, g1erSprLoc, gBoutons
  25.   set gNumSpr to -1
  26.   repeat with i = g1erSprLoc - 1 to g1erSprLoc + 3
  27.     if rollOver(i) then
  28.       set gNumSpr to i
  29.       exit repeat
  30.     end if
  31.   end repeat
  32.   if gNumSpr <> -1 then
  33.     gBoutons(appuie, gNumSpr)
  34.   end if
  35. end
  36.  
  37. on mouseUp
  38.   global gNumSpr, g1erSprLoc
  39.   curseur(1)
  40.   set monNumSpr to -1
  41.   repeat with i = g1erSprLoc - 1 to g1erSprLoc + 3
  42.     if rollOver(i) then
  43.       set monNumSpr to i
  44.       exit repeat
  45.     end if
  46.   end repeat
  47.   if (monNumSpr <> -1) and (monNumSpr = gNumSpr) then
  48.     MouseClick()
  49.   else
  50.     pass()
  51.   end if
  52. end
  53.